package org.jimmy.tang.cglib.beancopy;

import java.util.HashMap;
import java.util.Map;

/**
 * @author jimmy
 * 
 */
public class PropertyWithoutCopy {
    public static void main(String[] args) {
        Person p1 = new Person("zhangsan", 10);
        Map<String, Person> map = new HashMap<String, Person>();
        map.put("test", p1);
        // 改变将同时影响map中的对象
        p1.setName("lisi");
        p1.setAge(11);
        System.out.println(map.get("test"));
    }

}
